package com.mystudy.leetcode.problem.tree.p_105;

import com.mystudy.leetcode.base.TreeNode;

/**
 * @program: infoalgorithm
 * @description: 从前序与中序遍历序列构造二叉树
 * @author: zhouzhilong
 * @create: 2019-07-26 17:16
 **/
public class Solution {
    public TreeNode buildTree(int[] preorder, int[] inorder) {
        int rootVal = preorder[0];
        TreeNode root = new TreeNode(rootVal);
        int rootIndex = 0;
        for (int i = 0; i < inorder.length; i++) {
            if(inorder[i] == rootVal){
                rootIndex = i;
                break;
            }
        }
        return null;
    }



}
